<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>nih: nih::Stats&lt; T &gt; Struct Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nih
   &#160;<span id="projectnumber">0.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('structnih_1_1_stats.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">nih::Stats&lt; T &gt; Struct Template Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="nih::Stats" -->
<p><code>#include &lt;<a class="el" href="stats_8h_source.html">stats.h</a>&gt;</code></p>

<p><a href="structnih_1_1_stats-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a6e6d6f04266848eda17225b1f0402953">Stats</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a882a0ca9d48e403ff6026936b669b1bb">Stats</a> (const T min, const T max)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a3cab0803fe20106b282de8d2e3dfcb3d">operator+=</a> (const T v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#aaddb68f2119f81f83c94ea2afe3e2aa0">operator+=</a> (const <a class="el" href="structnih_1_1_stats.html">Stats</a>&lt; T &gt; &amp;v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#af01f7f8dd7a128d55d408481e72d6615">avg</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#af08c497de2da6e0fb9f1e0e58cc7d7d5">sum</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#aa5f3bd77225bd4f92d7dfbf5b76eb2d0">var</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#af9a03822086e7f6f77cdb8d49bc191ad">sigma</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a9004ea55168fe069477102bbc326fd30">min</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a731ffdbad86052f9189e5dd7f89dcaba">max</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnih_1_1_stats.html#a5e68da5d70cd31130bca00c4224fe740">count</a> () const </td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa7459733553c60fc382e5cf23305b06"></a><!-- doxytag: member="nih::Stats::m_sum" ref="aaa7459733553c60fc382e5cf23305b06" args="" -->
T&#160;</td><td class="memItemRight" valign="bottom"><b>m_sum</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05c76d0946fc5c28e4811769d7a17f65"></a><!-- doxytag: member="nih::Stats::m_sum_sq" ref="a05c76d0946fc5c28e4811769d7a17f65" args="" -->
T&#160;</td><td class="memItemRight" valign="bottom"><b>m_sum_sq</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afce3a72167740b7dfaa6ee0f6f3c755d"></a><!-- doxytag: member="nih::Stats::m_min" ref="afce3a72167740b7dfaa6ee0f6f3c755d" args="" -->
T&#160;</td><td class="memItemRight" valign="bottom"><b>m_min</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19922155e335a5b13681240ba4b1cd2c"></a><!-- doxytag: member="nih::Stats::m_max" ref="a19922155e335a5b13681240ba4b1cd2c" args="" -->
T&#160;</td><td class="memItemRight" valign="bottom"><b>m_max</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a851a2f8c0ddd9ca0b515a3f84e940a79"></a><!-- doxytag: member="nih::Stats::m_count" ref="a851a2f8c0ddd9ca0b515a3f84e940a79" args="" -->
long long&#160;</td><td class="memItemRight" valign="bottom"><b>m_count</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br/>
struct nih::Stats&lt; T &gt;</h3>

<p>A small helper class to keep statistics </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6e6d6f04266848eda17225b1f0402953"></a><!-- doxytag: member="nih::Stats::Stats" ref="a6e6d6f04266848eda17225b1f0402953" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::<a class="el" href="structnih_1_1_stats.html">Stats</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>empty constructor </p>

</div>
</div>
<a class="anchor" id="a882a0ca9d48e403ff6026936b669b1bb"></a><!-- doxytag: member="nih::Stats::Stats" ref="a882a0ca9d48e403ff6026936b669b1bb" args="(const T min, const T max)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::<a class="el" href="structnih_1_1_stats.html">Stats</a> </td>
          <td>(</td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>constructor</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>set the minimum value </td></tr>
    <tr><td class="paramname">max</td><td>set the maximum value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af01f7f8dd7a128d55d408481e72d6615"></a><!-- doxytag: member="nih::Stats::avg" ref="af01f7f8dd7a128d55d408481e72d6615" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::avg </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the average value </p>

</div>
</div>
<a class="anchor" id="a5e68da5d70cd31130bca00c4224fe740"></a><!-- doxytag: member="nih::Stats::count" ref="a5e68da5d70cd31130bca00c4224fe740" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long long <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the total sample count </p>

</div>
</div>
<a class="anchor" id="a731ffdbad86052f9189e5dd7f89dcaba"></a><!-- doxytag: member="nih::Stats::max" ref="a731ffdbad86052f9189e5dd7f89dcaba" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::max </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the maximum value </p>

</div>
</div>
<a class="anchor" id="a9004ea55168fe069477102bbc326fd30"></a><!-- doxytag: member="nih::Stats::min" ref="a9004ea55168fe069477102bbc326fd30" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::min </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the minimum value </p>

</div>
</div>
<a class="anchor" id="a3cab0803fe20106b282de8d2e3dfcb3d"></a><!-- doxytag: member="nih::Stats::operator+=" ref="a3cab0803fe20106b282de8d2e3dfcb3d" args="(const T v)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::operator+= </td>
          <td>(</td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>accumulate a new value</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>new value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aaddb68f2119f81f83c94ea2afe3e2aa0"></a><!-- doxytag: member="nih::Stats::operator+=" ref="aaddb68f2119f81f83c94ea2afe3e2aa0" args="(const Stats&lt; T &gt; &amp;v)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::operator+= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structnih_1_1_stats.html">Stats</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>accumulate some statistics</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>new value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af9a03822086e7f6f77cdb8d49bc191ad"></a><!-- doxytag: member="nih::Stats::sigma" ref="af9a03822086e7f6f77cdb8d49bc191ad" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::sigma </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the sample standard deviation </p>

</div>
</div>
<a class="anchor" id="af08c497de2da6e0fb9f1e0e58cc7d7d5"></a><!-- doxytag: member="nih::Stats::sum" ref="af08c497de2da6e0fb9f1e0e58cc7d7d5" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::sum </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the total accumulated value </p>

</div>
</div>
<a class="anchor" id="aa5f3bd77225bd4f92d7dfbf5b76eb2d0"></a><!-- doxytag: member="nih::Stats::var" ref="aa5f3bd77225bd4f92d7dfbf5b76eb2d0" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="structnih_1_1_stats.html">nih::Stats</a>&lt; T &gt;::var </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return the sample variance </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>basic/<a class="el" href="stats_8h_source.html">stats.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>nih</b>      </li>
      <li class="navelem"><a class="el" href="structnih_1_1_stats.html">Stats</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Thu Dec 15 2011 11:56:21 for nih by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
